#pragma once

#include "e2d/core/pch.h"
#include "e2d/core/Object.h"
#include "e2d/core/EntityMap.h"
#include "e2d/core/Type.h"

#define FXCC_DEFINE_COMPONENT_LABEL(ClassName) \
    static std::string _Label_() { return #ClassName; }

namespace e2d
{

	struct Entity;

	struct Component :public Object
	{

		e2d::Entity* m_Entity{ 0 };

		Component() :Object() {}

		bool EntityExist();

		virtual void OnLoad(){}
		
		virtual void OnStart() {}
		
		virtual void OnUpdate() {}
		
		virtual void OnUpdateRuntime() {}

		virtual void OnDestroy() {}

		e2d::Input* Input();
		
		e2d::Timer* Timer();

		e2d::Entity* Entity();

		e2d::Entity* GetParentEntity();
	};
};